@extends('admin')

@section('content')

    <div class="nav">
        <ul class="cc">
            <li class="current">
                <a href="{{url('admin/order/payment')}}">扫码付款订单</a>
            </li>
        </ul>
    </div>

    <div class="h_a">搜索</div>
    <div class="search_type cc mb10">
        <form action="{{url('admin/order/payment')}}" method="get" class="search_form">
            <label for="search_buyer_mobile">买家手机：</label><input type="text" name="buyer_mobile" value="{{$buyer_mobile}}" id="search_buyer_mobile" class="input length_2 mr10"/>
            <label for="search_store_name">店铺：</label><input type="text" name="store_name" value="{{$store_name}}" id="search_store_name" class="input length_2 mr10"/>
            <label for="search_order_sn">订单号：</label><input type="text" name="order_sn" value="{{$order_sn}}" id="search_order_sn" class="input length_2 mr10"/>
            <button type="submit" class="btn">提交查询</button>
        </form>
    </div>

    <div class="table_list">
        <div id="data_list">
            <table class="items">
                <thead>
                <tr>
                    <th>SN</th>
                    <th>买家</th>
                    <th>店铺名称</th>
                    <th>付款总额</th>
                    <th>付款时间</th>
                    <th>状态</th>
                </tr>
                </thead>
                <tbody>
                @foreach ($list as $item)
                    <tr>
                        <td>{{$item->order_sn}}</td>
                        <td>@if ($item->seller) {{$item->seller->name}} @endif</td>
                        <td>@if ($item->seller && $item->seller->store) {{$item->seller->store->store_name}} @endif</td>
                        <td>{{$item->amount}}</td>
                        <td>{{$item->pay_time}}</td>
                        <td>@if ($item->status == 2) <span class="green">付款成功</span> @else <span class="red">付款失败</span> @endif</td>
                    </tr>
                @endforeach
                </tbody>
            </table>
        </div>

        <div class="summary">
            共有 {{$list->total()}} 条数据
        </div>
        @if ($list->hasPages())
            <div class="pager">
                {!! $list->appends($appends)->render() !!}
            </div>
        @endif
    </div>

@stop